package me.dracen.lombok;

import lombok.NonNull;
import lombok.ToString;
import lombok.experimental.Wither;
@ToString
public class WitherExample {
@Wither private final int age;
@Wither @NonNull private final String name;
 
public WitherExample( int age,String name) {
  if (name == null) throw new NullPointerException();
  this.name = name;
  this.age = age;
}

  public static void main(String[] args) {
    WitherExample example = new WitherExample(1,"abc");
    example.withAge(1);
    example.withName("abc");
    System.out.println(example);
  }
}
